package com.it.you.controller.idcreate;

import com.it.you.common.enums.IdCreatorPrefixEnum;
import com.it.you.service.id.IdCreatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 生成id
 */
@RestController()
public class IdCreateController {

    @Autowired
    private IdCreatorService idCreatorService;

    @GetMapping("/idCreate")
    public String idCreate(){
        return idCreatorService.generateNo(IdCreatorPrefixEnum.YJJ_VALIDATE_NO).getValue();
    }

}
